import request from '@/utils/request'

/** 查询店铺分类 */
export function getShipmentList(query) {
    return request({
        url: '/walmart/WFL/shipmentList',
        method: 'get',
        params: query
    })
}

/** 查询不同出货量状态的数量 */
export function getShipmentCountStatus(query) {
    return request({
        url: '/walmart/WFL/shipmentCountStatus',
        method: 'get',
        params: query
    })
}
/** 查询不同出货量状态的数量 */
export function getShipmentItems(query) {
    return request({
        url: '/walmart/WFL/shipmentItems',
        method: 'get',
        params: query
    })
}

/** 取消库存，修改状态 */
export function getCancelShipment(query) {
    return request({
        url: '/walmart/shipment/cancelShipment',
        method: 'delete',
        params: query
    })
}

// 新增地址
export function addShipmentAddress(data) {
    return request({
        url: '/walmart/shipment/addShipmentAddress',
        method: 'post',
        data: data
    })
}
// 修改地址
export function updateShipmentAddress(data) {
    return request({
        url: '/walmart/shipment/updateAddress',
        method: 'post',
        data: data
    })
}
//州
export function getShipmentStateTree(query) {
    return request({
        url: '/walmart/shipment/stateTree',
        method: 'get',
        params: query
    })
}

//显示所有地址
export function getSelectAddress(query) {
    return request({
        url: '/walmart/shipment/selectAddress',
        method: 'get',
        params: query
    })
}

//创建发货
export function getShipmentInbound(data) {
    return request({
        url: '/walmart/shipment/inbound',
        method: 'post',
        data: data
    })
}
// 更新货运数量
export function updatedShipmentQty(data) {
    return request({
        url: '/walmart/shipment/updatedShipmentQty',
        method: 'post',
        data: data
    })
}
//创建入库标签
export function createShipmentLabel(data) {
    return request({
        url: '/walmart/shipment/createShipmentLabel',
        method: 'post',
        data: data
    })
}

//下载标签
export function downloadLabel(query) {
    return request({
        url: '/walmart/shipment/downloadLabel',
        method: 'get',
        responseType: 'blob',
        params: query
    })
}

// 货运追踪
export function setShipmentTracking(data) {
    return request({
        url: '/walmart/shipment/setShipmentTracking',
        method: 'post',
        data: data
    })
}
// 货运明细
export function getShipmentItem(query) {
    return request({
        url: '/walmart/shipment/getShipmentItem',
        method: 'get',
        params: query
    })
}


